
rm(list = ls())

## set working directory
curcomp <- "C:/Users/iosgood/Dropbox/Input alternatives/ia_rep"
setwd(curcomp)

## load libraries and define functions
library(plyr)
library(lmtest)
library(sandwich)
library(xtable)

myround <- function(vec, dig){return(formatC(round(as.numeric(as.character(vec)),dig),dig,format="f"))}

# for writing tables
ptable <- function(contents, file){
  print(xtable(contents), type='latex', sanitize.text.function=identity, include.rownames = FALSE, include.colnames = FALSE, 
        file = file, only.contents = TRUE, hline.after = NULL, add.to.row = addtorow)
}

## replication files
source("analysis/ia_rep main analysis script.R")
source("analysis/ia_rep export based measure script.R")
source("analysis/ia_rep exclude Japan and South Korea script.R")
source("analysis/ia_rep tariff robustness check script.R")




